﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

/** 
 * ——————————————————————————————————————————
 * | Summary  | Initialize Order: (Static Fields; Static Block) > Fields > Constructor
 * ——————————————————————————————————————————
 * | Author     | Heller (HellerSong@outlook.com)
 * —————————————————————————
 * | Creation   | 7/11/2015 6:46:41 PM
 * ————————————————————
 **/
namespace DevGrammar
{
	[TestClass]
	public class TestInitialize
	{
		private class InitializeOrderTest
		{
			public static String staticField = "Static Field";
			public String field = "field";


		}

		private class ForStaticConstructor
		{
			static ForStaticConstructor()
			{
				System.Console.WriteLine("The static constructor invoked.");
			}

			public static void Drive()
			{
				System.Console.WriteLine("The Drive method invoked.");
			}
		}
		
		
		[TestMethod]
		public void test_for_static_constructor()
		{
			ForStaticConstructor.Drive();

			// Output:
			//		The static constructor invoked.
			//		The Drive method invoked. 
		}

		[TestMethod]
		public void TestMethod1()
		{
			new InitializeOrderTest();
		}
	}
}
